﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Ms
{
    [Table("MsProjectStandard")]
    public class MsProjectStandard
    {
        /// <summary>
        /// 项目Id
        /// </summary>
        [Column(TypeName = "uuid")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid ProjectStandardId { get; set; }

        [Required]
        [Display(Name = "编码")]
        [Column(TypeName = "varchar(32)")]
        public string Code { get; set; }

        [Required]
        [Display(Name = "标题")]
        [Column(TypeName = "varchar(64)")]
        public string Title { get; set; }

        [Display(Name = "明细项 json")]
        [Column(TypeName = "text")]
        public string Content { get; set; }

        [Display(Name = "说明")]
        [Column(TypeName = "varchar(64)")]
        public string Description { get; set; }

        [Display(Name = "阶段")]
        [Column(TypeName = "varchar(32)")]
        public string Stage { get; set; }

        [Display(Name = "明细项模板 json")]
        [Column(TypeName = "text")]
        public string Template { get; set; }

        [Display(Name = "项目ID")]
        [Column(TypeName = "uuid")]
        public Guid ProjectGuid { get; set; }

        [Display(Name = "公司ID")]
        [Column(TypeName = "uuid")]
        public Guid CompanyGuid { get; set; }

        [Key]
        [Column(TypeName = "uuid")]
        public Guid MsProjectStandardId { get; set; }

        /// <summary>
        /// 标准库版本
        /// </summary>
        [Column(TypeName = "int4")]
        public int? Version { get; set; }
    }
}